cmake_minimum_required(VERSION 3.0)

project(stun)

include_directories(./)
include_directories(./../)
include_directories(./../stun_client/)
include_directories(./../../loop_event/)

set(stun_client ./stun_client_test.cpp)
aux_source_directory(./../ stun_client)
aux_source_directory(./../stun_client stun_client)

set(loop_event_list ./)
aux_source_directory(./../../loop_event loop_event_list)
aux_source_directory(./../../../util/ loop_event_list)

add_executable(stun_client ${stun_client} ${loop_event_list})
add_executable(write_buffer write_buffer_test.cpp ./../write_buffer.cpp)
add_executable(stun_message_test stun_message_test.cpp ./../write_buffer.cpp ./../message_attr.cpp ./../stun_message.cpp ${loop_event_list})

target_link_libraries(stun_client ssl crypto)
target_link_libraries(write_buffer ssl crypto)
target_link_libraries(stun_message_test ssl crypto)

set(lib avutil swscale swresample avcodec avformat avfilter avdevice)
target_link_libraries(stun_client ${lib})

set(open_libs -lz ssl crypto)


target_link_libraries(stun_client ${open_libs})
target_link_libraries(write_buffer ${open_libs})
target_link_libraries(stun_message_test ${open_libs})





